package ve.usb.ddp.hibernate;

import ve.usb.cohesion.runtime.LocalDate;

import java.util.HashSet;
import java.util.Set;


public class PaiResolucion implements java.io.Serializable, ve.usb.cohesion.runtime.Auditable {

    /** Creates a new instance of PaiResolucion */
    public PaiResolucion() {}
    
    /**
     * Holds value of property id.
     */
    private Long id;

    /**
     * Getter for property id.
     * @return Value of property id.
     */
    public Long getId() {
        return this.id;
    }

    /**
     * Holds value of property idResolucion.
     */
    private long idResolucion;

    /**
     * Getter for property idResolucion.
     * @return Value of property idResolucion.
     */
    public long getIdResolucion() {
        return this.idResolucion;
    }

    /**
     * Setter for property idResolucion.
     * @param idResolucion New value of property idResolucion.
     */
    public void setIdResolucion(long idResolucion) {
        this.id = this.idResolucion = idResolucion;
    }
    /**
     * Holds value of property pai.
     */
    private Pai pai;

    /**
     * Getter for property pai.
     * @return Value of property pai.
     */
    public Pai getPai() {
        return this.pai;
    }

    /**
     * Setter for property pai.
     * @param pai New value of property pai.
     */
    public void setPai(Pai pai) {
        this.pai = pai;
    }
    /**
     * Holds value of property fec_Resolucion.
     */
    private java.util.Date fec_Resolucion;

    /**
     * Getter for property fec_Resolucion.
     * @return Value of property fec_Resolucion.
     */
    public java.util.Date getFec_Resolucion() {
        return this.fec_Resolucion;
    }

    /**
     * Setter for property fec_Resolucion.
     * @param fec_Resolucion New value of property fec_Resolucion.
     */
    public void setFec_Resolucion(java.util.Date fec_Resolucion) {
        if (fec_Resolucion==null || fec_Resolucion instanceof LocalDate) 
            this.fec_Resolucion = fec_Resolucion;
        else this.fec_Resolucion = new LocalDate(fec_Resolucion);
    }
    /**
     * Holds value of property num_InformeDDP.
     */
    private int num_InformeDDP;

    /**
     * Getter for property num_InformeDDP.
     * @return Value of property num_InformeDDP.
     */
    public int getNum_InformeDDP() {
        return this.num_InformeDDP;
    }

    /**
     * Setter for property num_InformeDDP.
     * @param num_InformeDDP New value of property num_InformeDDP.
     */
    public void setNum_InformeDDP(int num_InformeDDP) {
        this.num_InformeDDP = num_InformeDDP;
    }
    /**
     * Holds value of property observacion.
     */
    private String observacion = "";

    /**
     * Getter for property observacion.
     * @return Value of property observacion.
     */
    public String getObservacion() {
        return this.observacion;
    }

    /**
     * Setter for property observacion.
     * @param observacion New value of property observacion.
     */
    public void setObservacion(String observacion) {
        this.observacion = observacion;
    }
    /**
     * Holds value of property num_Resolucion.
     */
    private int num_Resolucion;

    /**
     * Getter for property num_Resolucion.
     * @return Value of property num_Resolucion.
     */
    public int getNum_Resolucion() {
        return this.num_Resolucion;
    }

    /**
     * Setter for property num_Resolucion.
     * @param num_Resolucion New value of property num_Resolucion.
     */
    public void setNum_Resolucion(int num_Resolucion) {
        this.num_Resolucion = num_Resolucion;
    }
    /**
     * Holds value of property estudio.
     */
    private PaiEstudio estudio;

    /**
     * Getter for property estudio.
     * @return Value of property estudio.
     */
    public PaiEstudio getEstudio() {
        return this.estudio;
    }

    /**
     * Setter for property estudio.
     * @param estudio New value of property estudio.
     */
    public void setEstudio(PaiEstudio estudio) {
        this.estudio = estudio;
    }
    /**
     * Holds value of property apoderado.
     */
    private PaiApoderado apoderado;

    /**
     * Getter for property apoderado.
     * @return Value of property apoderado.
     */
    public PaiApoderado getApoderado() {
        return this.apoderado;
    }

    /**
     * Setter for property apoderado.
     * @param apoderado New value of property apoderado.
     */
    public void setApoderado(PaiApoderado apoderado) {
        this.apoderado = apoderado;
    }
    /**
     * Holds value of property remuneracion.
     */
    private Set<PaiRemuneracion> remuneracion = new HashSet<PaiRemuneracion>();

    /**
     * Getter for property remuneracion.
     * @return Value of property remuneracion.
     */
    public Set<PaiRemuneracion> getRemuneracion() {
        return this.remuneracion;
    }

    /**
     * Setter for property remuneracion.
     * @param remuneracion New value of property remuneracion.
     */
    public void setRemuneracion(Set<PaiRemuneracion> remuneracion) {
        this.remuneracion = remuneracion;
    }

    /**
     * Add an element to set property remuneracion
     * and sets elements's property resolucion.
     * @param element New element to be added to remuneracion.
     */
    public void addToRemuneracion(PaiRemuneracion element) {
        element.setResolucion(this);
        remuneracion.add(element);
    }

    /**
     * Removes and old element from set remuneracion 
     * and sets element's property resolucion to null.
     * @param old The element to be removed from remuneracion
     */
    public void removeFromRemuneracion(PaiRemuneracion old) {
        remuneracion.remove(old);
        old.setResolucion(null);
    }
    /**
     * Holds value of property estatus.
     */
    private Set<PaiEstatus> estatus = new HashSet<PaiEstatus>();

    /**
     * Getter for property estatus.
     * @return Value of property estatus.
     */
    public Set<PaiEstatus> getEstatus() {
        return this.estatus;
    }

    /**
     * Setter for property estatus.
     * @param estatus New value of property estatus.
     */
    public void setEstatus(Set<PaiEstatus> estatus) {
        this.estatus = estatus;
    }

    /**
     * Add an element to set property estatus
     * and sets elements's property resolucion.
     * @param element New element to be added to estatus.
     */
    public void addToEstatus(PaiEstatus element) {
        element.setResolucion(this);
        estatus.add(element);
    }

    /**
     * Removes and old element from set estatus 
     * and sets element's property resolucion to null.
     * @param old The element to be removed from estatus
     */
    public void removeFromEstatus(PaiEstatus old) {
        estatus.remove(old);
        old.setResolucion(null);
    }
    /**
     * Holds value of property permisoNoRemunerado.
     */
    private PaiPermisoNoRemunerado permisoNoRemunerado;

    /**
     * Getter for property permisoNoRemunerado.
     * @return Value of property permisoNoRemunerado.
     */
    public PaiPermisoNoRemunerado getPermisoNoRemunerado() {
        return this.permisoNoRemunerado;
    }

    /**
     * Setter for property permisoNoRemunerado.
     * @param permisoNoRemunerado New value of property permisoNoRemunerado.
     */
    public void setPermisoNoRemunerado(PaiPermisoNoRemunerado permisoNoRemunerado) {
        this.permisoNoRemunerado = permisoNoRemunerado;
    }
    /**
     * Holds value of property prorroga.
     */
    private PaiProrroga prorroga;

    /**
     * Getter for property prorroga.
     * @return Value of property prorroga.
     */
    public PaiProrroga getProrroga() {
        return this.prorroga;
    }

    /**
     * Setter for property prorroga.
     * @param prorroga New value of property prorroga.
     */
    public void setProrroga(PaiProrroga prorroga) {
        this.prorroga = prorroga;
    }
    /**
     * Holds value of property reintegro.
     */
    private PaiReintegro reintegro;

    /**
     * Getter for property reintegro.
     * @return Value of property reintegro.
     */
    public PaiReintegro getReintegro() {
        return this.reintegro;
    }

    /**
     * Setter for property reintegro.
     * @param reintegro New value of property reintegro.
     */
    public void setReintegro(PaiReintegro reintegro) {
        this.reintegro = reintegro;
    }
    /**
     * Holds value of property renunciaManutencion.
     */
    private PaiRenunciaManutencion renunciaManutencion;

    /**
     * Getter for property renunciaManutencion.
     * @return Value of property renunciaManutencion.
     */
    public PaiRenunciaManutencion getRenunciaManutencion() {
        return this.renunciaManutencion;
    }

    /**
     * Setter for property renunciaManutencion.
     * @param renunciaManutencion New value of property renunciaManutencion.
     */
    public void setRenunciaManutencion(PaiRenunciaManutencion renunciaManutencion) {
        this.renunciaManutencion = renunciaManutencion;
    }



    public String toString() {
        return "<PaiResolucion id='C" + this.id +
        //idResolucion
        ((pai==null) ? "" : "\" pai =\"C" + pai.getId()) +
        "\" fec_Resolucion =\"" + fec_Resolucion +
        "\" num_InformeDDP =\"" + num_InformeDDP +
        "\" observacion =\"" + observacion +
        "\" num_Resolucion =\"" + num_Resolucion +
        ((estudio==null) ? "" : "\" estudio =\"C" + estudio.getId()) +
        ((apoderado==null) ? "" : "\" apoderado =\"C" + apoderado.getId()) +
        //remuneracion
        //estatus
        ((permisoNoRemunerado==null) ? "" : "\" permisoNoRemunerado =\"C" + permisoNoRemunerado.getId()) +
        ((prorroga==null) ? "" : "\" prorroga =\"C" + prorroga.getId()) +
        ((reintegro==null) ? "" : "\" reintegro =\"C" + reintegro.getId()) +
        ((renunciaManutencion==null) ? "" : "\" renunciaManutencion =\"C" + renunciaManutencion.getId()) +
        "'/>";
    }

}